package cn.taoticket.client;

import cn.taoticket.pojo.TaoticketSchedulerSeat;

import cn.taoticket.fallback.TaoticketSchedulerSeatClientFallBack;

import java.util.List;
import java.util.Map;

import cn.taoticket.config.TaoTicketConfiguration;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * Created by shang-pc on 2018/5/15.
 */
@FeignClient(name = "taoticket-scheduler-provider", configuration = TaoTicketConfiguration.class, fallback = TaoticketSchedulerSeatClientFallBack.class)
public interface RestTaoticketSchedulerSeatClient {
    @RequestMapping(value = "/getTaoticketSchedulerSeatById", method = RequestMethod.POST)
    public TaoticketSchedulerSeat getTaoticketSchedulerSeatById(@RequestParam("id") Long id) throws Exception;

    @RequestMapping(value = "/getTaoticketSchedulerSeatListByMap", method = RequestMethod.POST)
    public List<TaoticketSchedulerSeat> getTaoticketSchedulerSeatListByMap(@RequestParam Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getTaoticketSchedulerSeatCountByMap", method = RequestMethod.POST)
    public Integer getTaoticketSchedulerSeatCountByMap(@RequestParam Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/qdtxAddTaoticketSchedulerSeat", method = RequestMethod.POST)
    public Integer qdtxAddTaoticketSchedulerSeat(@RequestBody TaoticketSchedulerSeat taoticketSchedulerSeat) throws Exception;

    @RequestMapping(value = "/qdtxModifyTaoticketSchedulerSeat", method = RequestMethod.POST)
    public Integer qdtxModifyTaoticketSchedulerSeat(@RequestBody TaoticketSchedulerSeat taoticketSchedulerSeat) throws Exception;

    @RequestMapping(value = "/getTaoticketSchedulerSeatByOrder", method = RequestMethod.POST)
    public TaoticketSchedulerSeat getTaoticketSchedulerSeatByOrder(@RequestParam("scheduleId") Long scheduleId,
                                                                   @RequestParam("seatX") Integer seatX,
                                                                   @RequestParam("seatY") Integer seatY) throws Exception;
}

